package com.openbravo.pos.printer.escpos;

import com.openbravo.pos.printer.DevicePrinter;
import com.openbravo.pos.printer.TicketPrinterException;
import java.awt.image.BufferedImage;
import javax.swing.JComponent;

public class DevicePrinterPlain
  implements DevicePrinter
{
  private static final byte[] NEW_LINE = { 13, 10 };
  private PrinterWritter out;
  private UnicodeTranslator trans;

  public DevicePrinterPlain(PrinterWritter paramPrinterWritter)
    throws TicketPrinterException
  {
    this.out = paramPrinterWritter;
    this.trans = new UnicodeTranslatorStar();
  }

  public String getPrinterName()
  {
    return "Plain";
  }

  public String getPrinterDescription()
  {
    return null;
  }

  public JComponent getPrinterComponent()
  {
    return null;
  }

  public void reset()
  {
  }

  public void beginReceipt()
  {
  }

  public void printImage(BufferedImage paramBufferedImage)
  {
  }

  public void printBarCode(String paramString1, String paramString2, String paramString3)
  {
    if (!"none".equals(paramString2))
    {
      this.out.write(paramString3);
      this.out.write(NEW_LINE);
    }
  }

  public void beginLine(int paramInt)
  {
  }

  public void printText(int paramInt, String paramString)
  {
    this.out.write(this.trans.transString(paramString));
  }

  public void endLine()
  {
    this.out.write(NEW_LINE);
  }

  public void endReceipt()
  {
    this.out.write(NEW_LINE);
    this.out.write(NEW_LINE);
    this.out.write(NEW_LINE);
    this.out.write(NEW_LINE);
    this.out.write(NEW_LINE);
    this.out.flush();
  }

  public void openDrawer()
  {
  }
}

/* Location:           D:\PowerFulPOS-2.30.2\openbravopos.jar
 * Qualified Name:     com.openbravo.pos.printer.escpos.DevicePrinterPlain
 * JD-Core Version:    0.6.0
 */